{	Problem: http://codechef.com/problems/TEST/
 	Verdict: Accepted
}
var i:longint;
begin
read(i);
while i<>42 do begin
	writeln(i);
	read(i);
end;
end. 